package com.css.zfzx.sjcj.modules.hddcActiveFault.repository;

import com.css.zfzx.sjcj.modules.hddcA1InvRgnHasMaterialTable.repository.entity.HddcA1InvrgnhasmaterialtableEntity;
import com.css.zfzx.sjcj.modules.hddcActiveFault.repository.entity.HddcActivefaultEntity;
import com.css.zfzx.sjcj.modules.hddcActiveFault.viewobjects.HddcActivefaultQueryParams;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zyb
 * @date 2020-11-30
 */
public interface HddcActivefaultRepository extends JpaRepository<HddcActivefaultEntity, String> {
    @Query(nativeQuery = true,value="select a.* from hddc_activefault a WHERE a.name=?1  and a.is_valid=1")
    HddcActivefaultEntity findByName(String name);

    HddcActivefaultEntity findByUuidAndIsValid(String id, String isValid);
}
